package cmo.neutech.day10.HomeWork.d3;

public class Circle extends Shape{
    double radius;
    public Circle(){};
    public Circle(double radius,String color){
        super(color);
        this.radius = radius;
    }
    @Override
    public double getArea() {
        return Math.PI*radius*radius;
    }
    @Override
    public double getPer() {
        return 2*Math.PI*radius;
    }
    @Override
    public void showAll(){
        System.out.println("圆的颜色是："+color+"圆的面积是："+getArea()+"，周长是："+getPer());
    }
}
